﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace Chefbook.DataObjects
{
    public interface IRecipe
    {
        /// <summary>
        /// Gets or sets the Name of the Recipe
        /// </summary>
        string Name { get; set; }

        /// <summary>
        /// Gets or sets the Description of the Recipe
        /// </summary>
        string Description { get; set; }
        
        /// <summary>
        /// Gets or sets the Directions for how to make the Recipe
        /// </summary>
        string Directions { get; set; }

        /// <summary>
        /// Gets or sets how much preparation time the Recipe requires
        /// </summary>
        TimeSpan PrepTime { get; set; }

        /// <summary>
        /// Gets or sets how long the Recipe needs to cook
        /// </summary>
        TimeSpan CookTime { get; set; }

        /// <summary>
        /// Gets a readonlylist of categories this recipe belongs to
        /// </summary>
        ReadOnlyCollection<Ingredient> Ingredients { get; }

        /// <summary>
        /// Gets a readonlylist of categories this recipe belongs to
        /// </summary>
        ReadOnlyCollection<Category> Categories { get; }

        /// <summary>
        /// Removes this recipe from all categories
        /// </summary>
        void Delete();

        /// <summary>
        /// Moves a recipe from one category to another
        /// </summary>
        /// <param name="from">The originating category</param>
        /// <param name="to">The category to move to</param>
        void ChangeCategory(Category from, Category to);

        /// <summary>
        /// Adds this recipe to a category
        /// </summary>
        /// <param name="categoryToAdd">The category to add this recipe to</param>
        void AddCategory(Category categoryToAdd);
        
        /// <summary>
        /// Removes this recipe from a category
        /// </summary>
        /// <param name="categoryToRemove">The category to remove from</param>
        void RemoveCategory(Category categoryToRemove);

        /// <summary>
        /// Creates a new ingredient in the recipe
        /// </summary>
        /// <returns>The ingredient that was created</returns>
        Ingredient CreateIngredient();

        /// <summary>
        /// Removes an ingredient from the recipe
        /// </summary>
        /// <param name="ingredientToRemove">The ingredient to remove</param>
        void RemoveIngredient(Ingredient ingredientToRemove);

    }
}
